home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 23 / 6 / DISK2368.ZIP / ANSWERS / CH04_1.CPP < prev    next >
C/C++ Source or Header  |  1990-07-20  |  563b  |  29 lines

  1.                               // Chapter 4 - Programming exercise 1
  2. #include "iostream.h"
  3.  
  4. void do_stuff(float wings, float feet, char eyes);
  5.  
  6. main()
  7. {
  8. int arm = 2;
  9. float foot = 1000.0;
  10. char lookers = 2;
  11.  
  12.    do_stuff(3, 12.0, 4);
  13.    do_stuff(arm, foot, lookers);
  14. }
  15.  
  16. void do_stuff(int wings, float feet, char eyes)
  17. {
  18.    cout << "There are " << wings << " wings." << "\n";
  19.    cout << "There are " << feet << " feet." << "\n";
  20.    cout << "There are " << eyes << " eyes." << "\n\n";
  21. }
  22.  
  23.  
  24.  
  25.  
  26. // Result of execution
  27. //
  28. // (No result - errors)
  29.